package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import com.rockcent.mall.lib.domain.enumclass.WithdrawCrowd;
import com.rockcent.mall.lib.domain.enumclass.WithdrawStatus;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * Created by DK on 16/12/12.
 * 提现记录
 */
@Entity
@Table(name = "withdraw_event")
@DynamicInsert
@DynamicUpdate
public class WithdrawEvent extends IDEntityMall {


    @Column(columnDefinition = "bigint comment '平台ID'")
    private Long mallId;

    @Column(columnDefinition = "bigint comment '申请提现人ID'")
    private Long proposerId;

    @Column(columnDefinition = "bigint comment '操作人ID'")
    private Long operatorId;

    @Column(columnDefinition = "varchar(30) comment '提现状态'")
    @Enumerated(EnumType.STRING)
    private WithdrawStatus status = WithdrawStatus.WAIT_AUDIT;

    @Column(columnDefinition = "bigint comment'提现申请ID'")
    private Long applyWithdrawId;

    @Column(columnDefinition = "varchar(30) comment '提现人群'")
    @Enumerated(EnumType.STRING)
    private WithdrawCrowd withdrawCrowd;

    public Long getProposerId() {
        return proposerId;
    }

    public void setProposerId(Long proposerId) {
        this.proposerId = proposerId;
    }

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public Long getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(Long operatorId) {
        this.operatorId = operatorId;
    }

    public WithdrawStatus getStatus() {
        return status;
    }

    public void setStatus(WithdrawStatus status) {
        this.status = status;
    }

    public Long getApplyWithdrawId() {
        return applyWithdrawId;
    }

    public void setApplyWithdrawId(Long applyWithdrawId) {
        this.applyWithdrawId = applyWithdrawId;
    }

    public WithdrawCrowd getWithdrawCrowd() {
        return withdrawCrowd;
    }

    public void setWithdrawCrowd(WithdrawCrowd withdrawCrowd) {
        this.withdrawCrowd = withdrawCrowd;
    }

    @Override
    public String toString() {
        return "WithdrawEvent{" +
                "mallId=" + mallId +
                ", proposerId=" + proposerId +
                ", operatorId=" + operatorId +
                ", status=" + status +
                ", applyWithdrawId=" + applyWithdrawId +
                ", withdrawCrowd=" + withdrawCrowd +
                '}';
    }
}
